#region Usings

using System;
using System.Collections.Generic;
using Castle.ActiveRecord;
using Karma.Framework.Core.Domain;

#endregion

namespace Karma.Framework.Core.Metadata.Mapping
{
    [ActiveRecord(Mutable = false)]
    public class Application : DomainObject
    {
        [JoinedKey]
        public override Int64 Id { get; set; }

        [Property(NotNull = true)]
        public bool EnMantenimiento { get; set; }

        [Property(NotNull = true)]
        public bool Debug { get; set; }

        [Property(NotNull = true)]
        public string Nombre { get; set; }

        [Property(NotNull = true)]
        public string AppVersion { get; set; }

        [Property(NotNull = true)]
        public string FileSystemVersion { get; set; }

        [HasMany(typeof (Module), ColumnKey = "Aplicacion", Cascade = ManyRelationCascadeEnum.All,
            Lazy = false, Table = "Modulo")]
        public IList<Module> Modulos { get; set; }
    }
}